/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package model.dao.addxuonghibernate;

import model.dao.AbstractQuery;
import model.entity.Admin;
import model.entity.Vaccine;

/**
 *
 * @author Admin
 */
public class VaccineDAO {
    private static final String LOAD_1_vaccine = "FROM Vaccine vaccine WHERE vaccine.vaccineMa =";
    
    public static final void insertVaccine(Vaccine vaccine){
        AbstractQuery.insertObject(vaccine.getNhaCungCap());
        AbstractQuery.insertObject(vaccine.getGia());
        AbstractQuery.insertObject(vaccine);
    }
    
      public static  void deleteVaccine(int vaccineMa){
        AbstractQuery.modifyObject(3, AbstractQuery.loadObject(LOAD_1_vaccine + vaccineMa).get(0));
    }
    
}
